
import { request } from '@ruifox-cms/utils'

// 查询所有文件夹
export function folderSelectAll(params) {
  return request({
    url: '/resource/folder/selectAll',
    method: 'get',
    params
  })
}
// 查询分页文件夹
export function folderSelectPage(params) {
  return request({
    url: '/resource/folder/selectPage',
    method: 'get',
    params
  })
}
// 根据id查询文件夹
export function folderSelectById(params) {
  return request({
    url: '/resource/folder/selectById',
    method: 'get',
    params
  })
}
// 根据id查询子文件夹及资源
export function selectPageFolderAndResourceById(params) {
  return request({
    url: '/resource/folder/selectPageFolderAndResourceById',
    method: 'get',
    params
  })
}
// 新增文件夹
export function folderCreate(data) {
  return request({
    url: '/resource/folder/create',
    method: 'post',
    data
  })
}
// 删除文件夹
export function folderDelete(data) {
  return request({
    url: '/resource/folder/delete',
    method: 'post',
    data
  })
}
// 批量删除子文件夹及资源
export function deleteListFolderAndResource(data) {
  return request({
    url: '/resource/folder/deleteListFolderAndResource',
    method: 'post',
    data
  })
}
// 修改文件夹
export function folderUpdate(data) {
  return request({
    url: '/resource/folder/update',
    method: 'post',
    data
  })
}
// 文件夹排序
export function folderUpdateSort(data) {
  return request({
    url: '/resource/folder/updateSort',
    method: 'post',
    data
  })
}
// 查询快捷访问
export function shortcutSelectAll(params) {
  return request({
    url: '/resource/shortcut/selectAll',
    method: 'get',
    params
  })
}
// 新增快捷访问
export function shortcutCreate(data) {
  return request({
    url: '/resource/shortcut/create',
    method: 'post',
    data
  })
}
// 批量删除快捷访问
export function shortcutDeleteList(data) {
  return request({
    url: '/resource/shortcut/deleteList',
    method: 'post',
    data
  })
}
// 批量移动用户资源夹和用户资源
export function moveListFolderAndResource(data) {
  return request({
    url: '/resource/folder/moveListFolderAndResource',
    method: 'post',
    data
  })
}